#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<string>
using namespace std;



int main()
{
    string s1;
    cin >> s1;
    for (int i = 0; i < s1.size(); i++)
    {
        int pos = s1.find(s1[i], i + 1);
        for (int i = 0; i < s1.size(); i++)
        {
            int pos = s1.find(s1[i], i + 1);
            if (pos == -1 && i == 0)
            {
                cout << s1[i] << endl;
                return 0;
            }
            else if (pos == -1 && i != 0)
            {
                pos = s1.rfind(s1[i], i - 1);
                if (pos == -1)
                {
                    cout << s1[i] << endl;
                    return 0;
                }
            }
        }
    }
    cout << -1;
    return 0;
}